import request from '@/utils/request'
export const getEmployeesSimpleList = () => request.get('/sys/user/simple')
export const getEmployeeList = (params) => request.get('/sys/user', { params })
export const delEmployee = (id) => request.delete(`/sys/user/${id}`)
export const addEmployee = (data) => request.post(`/sys/user`, data)
export const addExcelEmployees = (data) => request.post('/sys/user/batch', data)
export const updateEmployeeInfo = (data) => request.put(`/sys/user/${data.id}`, data)
export function getJobDetail(id) {
  return request({
    url: `/employees/${id}/jobs`,
    method: 'get'
  })
}

/**
 * 分配角色
 */
export const assignRoles = (data) => request.put('/sys/user/assignRoles', data)
